/*
 * Copyright (c) 2024. Shanghai HEADING information Engineering Co., Ltd. All rights reserved.
 */
package com.lovely602.design.study.proxy.cglib;

import net.sf.cglib.proxy.Enhancer;

/**
 * @author lizhixing
 */
public class CglibProxyTest {

  public static void main(String[] args) {
    Enhancer enhancer = new Enhancer();
    enhancer.setSuperclass(UserService.class);
    enhancer.setCallback(new CglibMethodInterceptor());
    UserService proxy = (UserService) enhancer.create();
    proxy.doSomething();
  }

}
